/**
 * PHOSIDE: PHosphorylation Site IDentification Engine.
 * Copyright 2009 Digital Biology Lab, University of Missouri.
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation; either version 3 of the License, or (at your option) any later
 * version. <p/> This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more
 * details.
 */

package phoside.model;

import java.io.Serializable;

import java.util.Set;
import java.util.Properties;

import phoside.PhosphoProteins.PhosphoType;

import phoside.classify.BinaryClassifier;
import phoside.classify.result.ROC;


/**
 *
 * @author gjj
 */
public class PhosideModelImpl implements PhosideModel, Serializable {
    private static final long serialVersionUID = 1447008980487158291L;
    
    protected Set<PhosphoType> siteType;
    protected BinaryClassifier classifier;
    protected Properties props;
    protected ROC roc;
    protected String name;
    protected String comment;
    transient String file;

    public PhosideModelImpl(PhosideModel model) {
        this(model.getSiteTypes(), model.getClassifier(),
                model.getModelProperties(), model.getROC(),
                model.getName(), model.getComment());
    }

    public PhosideModelImpl(Set<PhosphoType> siteType,
            BinaryClassifier classifier,
            Properties props,
            ROC roc) {
        this(siteType, classifier, props, roc, null, null);
    }

    public PhosideModelImpl(Set<PhosphoType> siteType,
            BinaryClassifier classifier,
            Properties props,
            ROC roc,
            String name,
            String comment) {
        this.siteType = siteType;
        this.classifier = classifier;
        this.props = props;
        this.roc = roc;
        this.name = name;
        this.comment = comment;
        this.file = null;
    }

    public BinaryClassifier getClassifier() {
        return classifier;
    }

    public Properties getModelProperties() {
        return props;
    }

    public ROC getROC() {
        return roc;
    }

    public Set<PhosphoType> getSiteTypes() {
        return siteType;
    }

    public String getName() {
        return name;
    }

    public String getComment() {
        return comment;
    }

    public String getFile() {
        return file;
    }

    public void setClassifier(final BinaryClassifier classifier) {
        this.classifier = classifier;
    }

    public void setModelProperties(final Properties props) {
        this.props = props;
    }

    public void setROC(final ROC roc) {
        this.roc = roc;
    }

    public void setSiteType(final Set<PhosphoType> siteType) {
        this.siteType = siteType;
    }

    public void setName(final String name) {
        this.name = name;
    }

    public void setComment(final String comment) {
        this.comment = comment;
    }

    public void setFile(final String file) {
        this.file = file;
    }

    public String toString() {
        return getName();
    }
}
